/**
 *  Copyright 2010 ShenYang voole Co. Ltd.
 *  All right reserved. 
 */
package cn.piaoyi.service;

import java.util.List;

import cn.piaoyi.bean.OrderInfo;
import cn.piaoyi.bean.UserInfo;
import cn.piaoyi.exception.PiaoyiException;
import cn.piaoyi.service.web.PageList;
import cn.piaoyi.service.web.Pages;

/**
 * 功能描述:用户事务接口
 *
 * 创建日期 Apr 10, 2010
 *
 * @author zhangbaochao
 *
 * @version 1.0
 *
 */
public interface OrderInfoService {
	/**
	 * 保存OrderInfo对象
	 * 
	 * @param orderInfo
	 * 			OrderInfo对象
	 * @return OrderInfo
	 * 			OrderInfo对象
	 */
	public OrderInfo createOrderInfo(OrderInfo orderInfo,List orderGoodses) throws PiaoyiException;
	
	/**
	 * 保存OrderInfo对象
	 * 
	 * @param orderInfo
	 * 			OrderInfo对象
	 * @return OrderInfo
	 * 			OrderInfo对象
	 */
	public OrderInfo updateOrderInfo(OrderInfo orderInfo) throws PiaoyiException;
	
	/**
	 * 根据主键ID获取OrderInfo对象
	 * 
	 * @param id
	 * 			主键ID
	 * @return OrderInfo
	 * 			OrderInfo对象
	 */
	public OrderInfo findOrderInfoById(long id);
	
	/**
	 * 根据主键orderNO获取OrderInfo对象
	 * 
	 * @param String
	 * 			订单号
	 * @return OrderInfo
	 * 			OrderInfo对象
	 */
	public OrderInfo findOrderInfoByOrderNO(String orderNO);
	
	/**
	 * 获取OrderInfo列表
	 * 
	 * @param userId
	 * 			long
	 * @param orderStatus
	 * 			int
	 * @param shippingStatus
	 * 			int
	 * @param payStatus
	 * 			int
	 * @param orderby
	 *            String
	 * @param ascOrDesc
	 *            int
	 * @param pages
	 * 			  Pages
	 * @return PageList
	 * 			OrderInfo对象列表
	 */
	public PageList findOrderInfos(long userId,int orderStatus,int shippingStatus,int payStatus,String orderby, int ascOrDesc,Pages pages);
	
	/**
	 * 删除OrderInfo对象
	 */
	public void removeOrderInfoById(long id);
}
